package com.shopping.nacos.controller;

import com.shopping.nacos.feign.ShoppingOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author jiaZhenpeng
 * @Title: StockController
 * @Package com.shopping.nacos.controller
 * @Description: 测试库存Controller
 * @date 2022/7/2717:57
 */
@RestController
@Slf4j
public class StockController {

    @Autowired
    private ShoppingOrderService shoppingOrderService;

    @PostMapping("/hi-feign")
    public String hiFeign(@RequestBody Map map){
        log.info("---------------"+map.toString());
        return "stock+++"+this.shoppingOrderService.hello(map.get("name").toString());
    }
}
